package com.onpositive.notes.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

public interface ITemplateModel<T extends ITemplate> extends IHasClass<T>, Serializable {
	
	public void applyTemplate( T template ) ;
	
	public void cancelTemplate( T template ) ;
	
	public String getText( T template ) ;
	
	public String getText( T template, Locale locale) ;
	
	public String getId() ;
	
	public String getKey() ;
	
	public List<String> getAllKeys() ;
	
	public String getKey(Locale locale) ;
	
	public T createInstance() ;
	
	public List<IArgumentModel<?,?>> getArgumentModels() ;
	
	public List<Locale> getAvailableLocales() ;
	
	public IArgumentModel<?,?> getArgumentModel( int id ) ;

	public boolean validate(IArgumentModel<?, ?> argModel, Object value );
	
	public int getArgSetsCount() ;// <0 means any

	List<ITemplateArgument<?>> initArguments();
}
